﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmMessageManage.aspx.cs"
    Inherits="LMS.SMSH.WEB.AdmMessageManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>留言管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div align="center">
        <table width="900" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" align="left" style="width: 120px; text-align: center;">
                    &nbsp;&nbsp;<strong>留言管理</strong>
                </td>
                <td height="30" align="right" style="width: 580px; text-align: center">
                    <font size="2">回复状态</font>
                    <asp:DropDownList ID="ddlMessageStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMessageStatus_SelectedIndexChanged">
                        <asp:ListItem Text="全部" Value="-1"></asp:ListItem>
                        <asp:ListItem Text="已处理" Value="1"></asp:ListItem>
                        <asp:ListItem Text="待处理" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                    <%--                  <asp:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Text="搜 索" />&nbsp;--%>
                </td>
            </tr>
            <tr>
                <td height="30" colspan="2" align="left">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="gvMessage" runat="server" AutoGenerateColumns="False" BorderColor="Black"
                                Width="900px" AllowPaging="True" OnPageIndexChanging="gvMessage_PageIndexChanging"
                                OnRowDataBound="gvMessage_RowDataBound" PageSize="10" OnRowCommand="gvMessage_RowCommand"
                                HorizontalAlign="Center">
                                <RowStyle BackColor="Orange" Font-Size="Small" />
                                <Columns>
                                    <asp:TemplateField HeaderText="行编号">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="5%" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="5%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="全选">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkHeader" runat="server" Text="全选" AutoPostBack="true" OnCheckedChanged="chkHeader_CheckedChanged" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkItem" runat="server" Text="" AutoPostBack="true" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="学生学号" DataField="mesStuNo">
                                        <HeaderStyle HorizontalAlign="Center" Width="9%" />
                                        <ItemStyle HorizontalAlign="Center" Width="9%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="留言时间">
                                        <HeaderStyle HorizontalAlign="Center" Width="9%" />
                                        <ItemStyle HorizontalAlign="Center" Width="9%" />
                                        <ItemTemplate>
                                            <%#Eval("mesTime","{0:yyyy-MM-dd}")%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="留言标题" DataField="mesTitle">
                                        <HeaderStyle HorizontalAlign="Center" Width="11%" />
                                        <ItemStyle HorizontalAlign="Center" Width="11%" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="详细内容" DataField="mesDetail" ItemStyle-Width="50px">
                                        <HeaderStyle HorizontalAlign="Center" Width="18%" />
                                        <ItemStyle HorizontalAlign="Center" Width="18%" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="留言状态" DataField="mesStatus">
                                        <HeaderStyle HorizontalAlign="Center" Width="9%" />
                                        <ItemStyle HorizontalAlign="Center" Width="9%" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="回复留言" DataField="mesReply">
                                        <HeaderStyle HorizontalAlign="Center" Width="18%" />
                                        <ItemStyle HorizontalAlign="Center" Width="18%" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="回复人ID" DataField="mesAdminId">
                                        <HeaderStyle HorizontalAlign="Center" Width="9%" />
                                        <ItemStyle HorizontalAlign="Center" Width="9%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="回复">
                                        <HeaderStyle HorizontalAlign="Center" Width="8%" />
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLink1" Text="回复" runat="server" 
                                            NavigateUrl='<%# "AdmMeassageView.aspx?mesId=" + Eval("mesId").ToString() %>'>
                                            </asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="删除">
                                        <HeaderStyle HorizontalAlign="Center" Width="7%" />
                                        <ItemStyle HorizontalAlign="Center" Width="7%" />
                                        <ItemTemplate>
                                            <asp:Button ID="btnMyDelete" runat="server" CommandArgument='<%#Eval("mesId")%>'
                                                CommandName="myDelete" Text="删除" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="OrangeRed" />
                                <AlternatingRowStyle BackColor="NavajoWhite" />
                                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast"
                                    NextPageText="下一页" PreviousPageText="上一页" />
                                <PagerStyle BackColor="#FFC080" Font-Size="Small" Font-Strikeout="False" Font-Underline="False"
                                    ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Top" />
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
